package com.xuan.shop.dao;

import com.xuan.shop.entity.Privs;
import com.xuan.shop.entity.PrivsUser;
import com.xuan.shop.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IUserDao extends JpaRepository<User,Integer> {
    @Query(value = "select user_username from user_tab",nativeQuery = true)
    List<String> findAllUserName();
    List<User> findUsersByUsername(String username);
    User findUsersByUsernameAndPassword(String username,String password);

}
